Skip to content

Update TCP_common.c - #2387

Closed
xzhdream wants to merge 1 commit into
TokTok:masterfrom
xzhdream:xzhdream-patch-1
Closed

Update TCP_common.c#2387
xzhdream wants to merge 1 commit into
TokTok:masterfrom
xzhdream:xzhdream-patch-1

Conversation

@xzhdream

@xzhdream xzhdream commented Aug 8, 2023

Copy link
Copy Markdown

func: add_priority
priority_queue_start is a list for read, priority_queue_end is just as a tag


This change is Reviewable

func: add_priority
priority_queue_start is a list for read, priority_queue_start is just as a tag
@codecov

codecov Bot commented Aug 16, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 10.00%. Comparing base (a1e2458) to head (79d1bbf).
⚠️ Report is 467 commits behind head on master.

Files with missing lines Patch % Lines
toxcore/TCP_common.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2387      +/-   ##
==========================================
+ Coverage    9.98%   10.00%   +0.02%     
==========================================
  Files         141      141              
  Lines       32530    32530              
==========================================
+ Hits         3247     3255       +8     
+ Misses      29283    29275       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iphydf

iphydf commented Aug 16, 2023

Copy link
Copy Markdown
Member

Can you explain a bit more what this change is doing?

@xzhdream

xzhdream commented Aug 22, 2023

Copy link
Copy Markdown
Author

Can you explain a bit more what this change is doing?

it is only a logical problem. priority_queue_start is used to read.
if TCP_Priority_List *p = con->priority_queue_start
then if (p != nullptr) { p->next = new_list; } else { con->priority_queue_start = new_list; }
can work as its goal

@iphydf iphydf added this to the v0.2.20 milestone Nov 10, 2023
@TokTok TokTok deleted a comment from CLAassistant Dec 20, 2023
@JFreegman

Copy link
Copy Markdown
Member

@xzhdream How does this change current behaviour? As far as any of us are aware, this function already works as intended. Are we mistaken?

@iphydf iphydf modified the milestones: v0.2.20, v0.2.21 Nov 6, 2024
@Green-Sky Green-Sky modified the milestones: v0.2.21, v0.2.22 Feb 1, 2025
@Green-Sky Green-Sky modified the milestones: v0.2.22, v0.2.23 Oct 1, 2025
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
@iphydf

iphydf commented Jan 17, 2026

Copy link
Copy Markdown
Member

#2988

This PR is closed for being an invalid and dangerous change. If you have other ideas, please reopen and discuss.

@iphydf iphydf closed this Jan 17, 2026
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
iphydf added a commit to iphydf/c-toxcore that referenced this pull request Jan 17, 2026
This test ensures that multiple priority packets added to a
`TCP_Connection` while the socket is busy are correctly queued in the
linked list without dropping intermediate packets.

Specifically, it protects against regressions where updating the tail
pointer incorrectly (e.g., using the head pointer as a base for append)
would result in data loss. This was identified as a risk in PR TokTok#2387.
@iphydf iphydf removed this from the v0.2.23 milestone Jan 31, 2026
@iphydf iphydf added this to the v0.2.22 milestone Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants